GtkViewport: Don't do silly things in a setter
authorMatthias Clasen <mclasen@redhat.com>
Mon, 9 Jun 2014 17:51:58 +0000 (13:51 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 9 Jun 2014 17:51:58 +0000 (13:51 -0400)
Just queue a resize instead of fiddling with the size allocation.

gtk/gtkviewport.c

index edba7aa1edfb77704eb3794ceaa9e699a9793b00..f0ac9b02339b851a7d3c7dfc7da8198101c69a46 100644 (file)
@@ -617,13 +617,7 @@ gtk_viewport_set_shadow_type (GtkViewport   *viewport,
     {
       priv->shadow_type = type;
 
-      if (gtk_widget_is_drawable (widget))
-       {
-          gtk_widget_get_allocation (widget, &allocation);
-          gtk_widget_size_allocate (widget, &allocation);
-          gtk_widget_set_allocation (widget, &allocation);
-          gtk_widget_queue_draw (widget);
-       }
+      gtk_widget_queue_resize (widget);
 
       g_object_notify (G_OBJECT (viewport), "shadow-type");
     }